package com.tnf.bc.bground.common.exception;


import com.tnf.bc.bground.common.utils.resultutil.ApiResponse;

/**
 * @description: //自定义异常
 * @author: lzl
 * @create: 2022-11-24 22:04
 **/
public class BookSysException extends RuntimeException{

    private int code;

    private String msg;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public BookSysException(ApiResponse.Status resultMsg) {
        super(resultMsg.getStandardMessage());
        this.code = resultMsg.getCode();
        this.msg = resultMsg.getStandardMessage();
    }
}